#pragma once

/* pixel size of tile */
#define TILE_SIZE 20
/* total number of tiles, with NONE as the first, LAST the last type */
#define NUM_TILES (LAST + 1)
/* windows size, unit of tiles */ 
#define WINDOW_WIDTH 40
#define WINDOW_HEIGHT 30
/* world size, unit of tiles */ 
#define WORLD_WIDTH 10
#define WORLD_HEIGHT 30
/* initialize the scene */
void world_init();
/* calculate which tile on window position (tx, ty) */
void * window_tile(int tx, int ty);
/* render tile on (tx, ty), unit of tile,
   origin point is the top-left of the window */
_Bool window_render(int tx, int ty);
/* move window with unit of offset (dx, dy) */
void window_move(int dx, int dy);
/* move the window to the world position (wx, wy) */ 
void window_moveto(int wx, int wy);

